home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d882.lha / GALer / GALer_english / Doc / GALer.doc next >
Text File  |  1993-07-16  |  61KB  |  2,077 lines

  1.  
  2.  
  3.  
  4.  
  5. GALer - copyright by Christian Habermann
  6.              Asamstr. 17
  7.              85356 Freising
  8.              Germany
  9.  
  10.              FidoNet: 2:246/105.10
  11.  
  12.  
  13.  
  14.  
  15. GALer is a GAL programming device with relevant driver software. GALer is
  16. SHAREWARE. If you use this program and/or the hardware, please
  17. send me 20 DM or 15 US $. The circuit diagram for the hardware will
  18. be sent to you on receipt of the shareware donation.
  19.  
  20. Send money by postal money order or cash, no checks please! If you send
  21. me a disk you will be sent the next update of GALer when it becomes
  22. available.
  23.  
  24.  
  25. The distribution of GALer on PD-disks or through the networks is
  26. permitted, as long as no profit is made from it, and that the included
  27. files remain unaltered, and are distributed in their entirety. If you build
  28. the GAL-prommer you are allowed to sell this one, to the price of the parts.
  29. It is not allowed to sell this product in commercial way. The circuit
  30. diagram must only be distributed privately and free of charge.
  31.  
  32.  
  33.  
  34.  
  35. WARNING!!! The "GALer" and "GALerTest" programs send data over your Amiga's
  36. parallel port. This means: when you have a printer, digitizer, or
  37. something else attached, it should be switched off or disconnected, since
  38. it is possible that you may damage them.
  39.  
  40.  
  41. I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER OR PRERIPHERALS.
  42.  
  43.  
  44.  
  45.  
  46. The "GALer" hardware and software has been running faultlessly on my A3000.
  47. I have tested GALer on A1000, A3000 and A4000 machines. It should run on
  48. all other Amigas too.
  49. The circuit diagram is 100% fault free. With careful construction
  50. there is no reason for anything going awry. Even so the construction should
  51. be carried out by electronics freak (you should at least have soldering
  52. experience, and be able to intelligently read circuit diagrams). More
  53. information about the construction can be found in chapter III.
  54.  
  55.  
  56. Note: This manual sparely covers the operational theory of GAL programming.
  57. It is not a substitute for further reading (see the end of this file for
  58. litarature).
  59.  
  60.  
  61. If you already have long experience with digital circuitry, and really don't
  62. care how a GAL is made, or how it works internally, then this manual together
  63. with the examples should suffice to intelligently implement your GALs.
  64.  
  65.  
  66.  
  67.  
  68.  
  69. Versions:
  70.  
  71. V1.0:   Test version
  72.  
  73. V1.1:   Intuition-interface added
  74.  
  75. V1.2:   cured a few bugs
  76.  
  77. V1.3:   cured some bugs in the GAL assembler. /name.E is no longer allowed.
  78.     The pin names of the last assembled files can be assigned to the
  79.         indicated GAL.
  80.  
  81. V1.4:   Kick 2.0
  82.     new Intuition environment
  83.     support of A- and B-type GALs
  84.     new format of JEDEC-files
  85.     new functions: verify of programmed GALs
  86.                test whether security fuse is set or not
  87.                compare GALs
  88.                optimizer for Boolean equations
  89.                reassembler
  90.     IMPORTANT CHANGE!!!:
  91.       '/' in pin declaration is now considered in the equations
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98. Thanks to:    - all registerd GALer users
  99.  
  100.         - Frank Stange for beta-testing
  101.  
  102.         - Walraven van Heeckeren, Wenzel Hoche, Peter Roessel
  103.           and Helmut Hohenwarter for parts of the English
  104.           documentation
  105.  
  106.         - Colin Fox and Bruce Dawson for the 'req.library'
  107.  
  108.         - Commodore for the great Amiga
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. Contents:
  117.  
  118.     Chapter I      Introduction
  119.         I.1     What are GALs
  120.         I.2     What is Inside of a GAL?
  121.         I.3     What Kind of GALs are there?
  122.         I.4     The Operation Modes of a GAL
  123.  
  124.  
  125.     Chapter II     The Software
  126.         II.1     The Source File
  127.  
  128.         II.2     The Program "GALer"
  129.         II.2.1     Installation
  130.         II.2.2   How to use GALer
  131.         II.2.3   Menus
  132.         II.2.4   Assembler
  133.         II.2.5     How to Program GALs
  134.         II.2.6     How to Test Programmed GALs
  135.         II.2.7     Optimizer
  136.  
  137.         II.3     JEDEC File
  138.  
  139.         II.4     Further Examples
  140.  
  141.         II.5     Error Messages
  142.         II.5.1     Assembler
  143.         II.5.2   JEDEC File
  144.         II.5.3     Reassembler
  145.  
  146.     Chapter III    The Hardware
  147.         III.1     Programming GALs
  148.         III.2     Circuit Description
  149.         III.3     Construction
  150.  
  151.     Appendix
  152.         Source File Keywords
  153.         Parts List
  154.         Further Reading
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162. Chapter I: Introduction
  163. =====================
  164.  
  165. I.1 What are GALs?
  166. ------------------
  167.  
  168. GALs (Generic Array Logic) are programmable logic devices.
  169. By appropriate programming by the user, many standard gate functions
  170. can be resolved into a single GAL chip.
  171.  
  172. Assuming you need the following logic functions for your circuit:
  173.  
  174.  - AND -Gate with 2 inputs
  175.  - OR  -Gate with 2 inputs
  176.  - NAND-Gate with 2 inputs
  177.  - NOR -Gate with 2 inputs
  178.  
  179.  
  180. Normally you would need FOUR standard TTL-ICs. These functions can be
  181. replaced with ONE GAL. The main use of GALs is to make digital circuits as
  182. simple as possible, by replacing many standard logic ICs by one or more
  183. GALs. A GAL is able, with appropriate programming, to replace all the logic
  184. functions, such as for example: AND, OR, XOR, NAND, NOR, inverters,
  185. FlipFlops, decoders (especially address decoders), mutiplexers, counters.
  186. On top of all the GAL is reprogrammable (at least 100 times), so that the
  187. desired logic functions may easily be altered.
  188.  
  189.  
  190.  
  191. I.2 What is inside of a GAL?
  192. --------------------------------------
  193.  
  194. The essential part of a GAL is a matrix. The input pins of the GAL are
  195. connected both inverted and uninverted to the columns of this matrix.
  196. If the GAL hasn't been programmed the rows and columns are connected to
  197. each other. Every connection between a row and a column represents an
  198. AND gate. If the GAL is programmed the particular connections are erased
  199. so that the wanted logic is programmed. A row is called a product term,
  200. because every column (input) that is still connected to a row represents
  201. an AND gate.
  202.  
  203. Eight of these rows (product terms) are connected via an OR gate with
  204. the so called OLMC (Output Logic Macrocell). So eight product terms can
  205. be ORed together. The OLMC is a "configurable output cell".
  206.  
  207. What is a "Configurable Output Cell"?
  208.  
  209. A GAL contains eight of these configurable output cells. These output
  210. cells may be configured as input, combinational output, tristate output,
  211. or register output.
  212.  
  213. Combinational Output:    This output can be HIGH or LOW.
  214.  
  215. Tristate Output:    This output can take one of three states:
  216.                HIGH, LOW, and HIGH IMPEDANCE
  217.                        This is used if you want to tie two outputs together,
  218.             but only one may be active.
  219.  
  220. Register Output:    With this output the result of an equation is not
  221.             directly coupled to the output, but connected via
  222.             a D-FlipFlop. Only on receipt of a clock pulse, is
  223.             the signal passed to the output. When /OE is HIGH,
  224.             then the output goes HIGH-IMPEDANCE.
  225.  
  226.  
  227.  
  228. Besides the Matrix, a GAL contains extra bits:
  229. ( (n) means that these bits are available for each output).
  230.  
  231. XOR (n) : The result of the digital connection can be negated with this bit.
  232.         XOR (n) = 0 : Output is active LOW
  233.         XOR (n) = 1 : Output is active HIGH
  234.  
  235.  
  236. SYN, AC0, AC1(n):
  237.     This bits determine in which mode the GAL works.
  238.     There are three main operating modes in which the GAL works:
  239.  
  240.   Mode 1:  SYN = 1, AC0 = 0
  241.         AC1(n) = 1 : OLMC as input
  242.         AC1(n) = 0 : OLMC as combinational output
  243.  
  244.   Mode 2:  SYN = 1, AC0 = 1
  245.         AC1(n) = 1 : tristate output
  246.  
  247.   Mode 3:  SYN = 0, AC0 = 1
  248.     AC1(n) = 1 : OLMC as tristate output
  249.     AC1(n) = 0 : OLMC as register output
  250.  
  251.  
  252. PT0...63: (PT = product term)
  253.       These bits indicate whether the rows (product terms) 0...63 in the
  254.       GAL's matrix are valid or not.
  255.       PTx = 1: AND-junction in the row x is valid.
  256.       PTx = 0: AND-junction in the row x is not used (have no effect) on
  257.            the output.
  258.       (x = between 0 and 63; there are 64 rows in the matrix,
  259.        so that each row can be individually activated or deactivated)
  260.  
  261. All these bits (82 bits) are tied together via the so called Architecture-
  262. Control-Word (ACW). The ACW is described in chapter III.
  263.  
  264.  
  265. Signature:
  266.     Here are eight bytes for your own use. Normally a short comment or
  267.     a version number of the GAL is placed here.
  268.  
  269.  
  270. Security fuse: (Security-Bit)
  271.    By setting these bit the GAL can be protected from unauthorized copying.
  272.    The reading of the logic matrix is no longer possible. Since the rest of
  273.    the bits can still be read this protection is not very effective.
  274.  
  275.  
  276. Bulk Erase:
  277.     By programming this row the whole GAL is erased. Now it is possible to
  278.     program the GAL again. A GAL can be reprogrammed about 100 times.
  279.  
  280.  
  281.  
  282.  
  283. I.3 What kind of GALs are there?
  284. --------------------------------
  285.  
  286. The most common types of GALs are the standard types GAL16V8, GAL20V8 and the
  287. A and B types GAL16V8A, GAL20V8A. All this GALs are supported by GALer.
  288. A and B type GALs are faster than the standard GALs.
  289. Since there is no greate difference between the standard, A and B type GALs
  290. I will only talk about the standard GALs GAL16V8 and GAL20V8. When there are
  291. any differences between A, B and standard GALs I will mention this extra.
  292.  
  293.  
  294. Pin designations:
  295.  
  296.  
  297.               GAL16V8
  298.              ---- ----
  299.     Input or Clock  1|       |20  +5V
  300.         Input    2|       |19  Configurable Output Cell
  301.         Input   3|       |18  Configurable Output Cell
  302.         Input   4|       |17  Configurable Output Cell
  303.         Input   6|       |15  Configurable Output Cell
  304.         Input   7|       |14  Configurable Output Cell    
  305.         Input   8|       |13  Configurable Output Cell
  306.         Input   9|       |12  Configurable Output Cell
  307.           GND  10|       |11  Input or /OE
  308.                         ---------
  309.  
  310.  
  311.               GAL20V8
  312.              ---- ----
  313.     Input or Clock  1|       |24  +5V
  314.         Input   2|       |23  Input
  315.         Input   3|       |22  Configurable Output Cell
  316.         Input   4|       |21  Configurable Output Cell
  317.         Input   5|       |20  Configurable Output Cell
  318.         Input   6|       |19  Configurable Output Cell
  319.         Input   7|       |18  Configurable Output Cell
  320.         Input   8|       |17  Configurable Output Cell
  321.         Input   9|       |16  Configurable Output Cell
  322.         Input  10|       |15  Configurable Output Cell
  323.         Input  11|       |14  Input
  324.         GND    12|       |13  Input or /OE
  325.              ---------
  326.  
  327.  
  328. From the pin designations you can see that the only difference between the
  329. types of GALs is the number of inputs. The choice of GAL then, is dependant
  330. solely on the number of inputs required.
  331.  
  332.  
  333.  
  334.  
  335.  
  336. I.4 The Operation Modes of a GAL
  337. --------------------------------
  338.  
  339. As already explained under I.2, the SYN, AC0 and AC1(n) bits determine 
  340. the mode of the GAL. The pin designations of the GAL are determined
  341. by this mode.
  342.  
  343.  
  344. GAL16V8:
  345.  
  346.  
  347.   Mode 1 |  Mode 2  |  Mode 3              Mode 1  | Mode 2  | Mode 3
  348.   ---------------------------              --------------------------
  349.      |        |             --- ---          |         |
  350.   In     |    In    |  Clock    1|     |20    +5V     |   +5V   |   +5V
  351.   In     |    In    |    In    2|     |19    In/C    |   T*    |  In/T/R  
  352.   In     |    In    |    In    3|     |18    In/C    |   In/T  |  In/T/R
  353.   In     |    In    |    In    4|     |17    In/C    |   In/T  |  In/T/R
  354.   In     |    In    |    In    5|     |16     C      |   I/T   |  In/T/R
  355.   In     |    In    |    In    6|     |15     C      |   In/T  |  In/T/R
  356.   In     |    In    |    In    7|     |14    In/C    |   In/T  |  In/T/R
  357.   In     |    In    |    In        8|     |13    In/C    |   In/T  |  In/T/R
  358.   In     |    In    |    In    9|     |12    In/C    |   T*    |  In/T/R
  359.   GND    |   GND    |   GND    10|     |11     In     |   In    |   /OE
  360.                  -------
  361.  
  362.  
  363.  
  364. GAL20V8:
  365.  
  366.   Mode 1 |  Mode 2  |  Mode 3              Mode 1  | Mode 2  | Mode 3
  367.   ---------------------------              --------------------------
  368.      |        |             --- ---          |         |
  369.   In     |    In    |  Clock    1|    |24    +5V    |   +5V   |   +5V
  370.   In     |    In    |    In    2|    |23       In     |    In   |    In  
  371.   In     |    In    |    In    3|    |22    In/C   |   T*    |  In/T/R
  372.   In     |    In    |    In    4|    |21    In/C   |   In/T  |  In/T/R
  373.   In     |    In    |    In    5|    |20    In/C   |   In/T  |  In/T/R
  374.   In     |    In    |    In    6|    |19     C     |   In/T  |  In/T/R
  375.   In     |    In    |    In    7|    |18     C     |   In/T  |  In/T/R
  376.   In     |    In    |    In     8|    |17    In/C   |   In/T  |  In/T/R
  377.   In     |    In    |    In     9|    |16    In/C   |   In/T  |  In/T/R
  378.   In     |    In    |    In    10|    |15    In/C   |   T*    |  In/T/R
  379.   In     |    In    |    In    11|    |14     In    |    In   |    In
  380.   GND    |   GND    |   GND    12|    |13     In    |    In   |   /OE
  381.                  -------
  382.  
  383. Abbreviations:
  384.  
  385.     In  :  input
  386.  
  387.     C   :  combinational output without feedback
  388.  
  389.     T   :  tristate-output
  390.  
  391.     T*  :  tristate-output without freedback to the matrix, which means
  392.            that this output cannot be configured as input
  393.  
  394.     R   :  register-output
  395.  
  396.       Clock :  pulse for D-FlipFlops; only affects those pins which are
  397.            configured as register-output
  398.  
  399.       /OE   :  output enable (low active): activate the register-outputs
  400.               (see I.2)
  401.  
  402.  
  403. From the pin designations you can see that pins 15 and 16 of the GAL16V8
  404. and pins 18 and 19 of GAL20V8 cannot be programmed as inputs when the GAL is
  405. in mode 1. The same hold true for pins 12 and 19 and 15 and 22 for mode 2.
  406. In mode 1, pins 1 and 11 (GAL16V8) and pins 1 and 13 (GAL20V8) are reserved 
  407. for Clock and /OE. These pins therefore cannot be used as inputs.
  408.  
  409. If you need at least one register output in your GAL, then mode 3 is used.
  410. When you need at least one Tristate-Output and no register output, then the
  411. GAL will be in mode 2. When you need neither a tristate nor a register
  412. output, mode 1 is used.
  413.  
  414.  
  415.  
  416. Chapter II: The Software
  417. ========================
  418.  
  419. In principle you can forget all of chapter I. In principle! What you should
  420. remember is the pin designations of the GAL in the different modes. Thereby
  421. avoiding many unnecessary failures. The determination of the function mode
  422. and the other parameters, which are to be taken into account during the
  423. programming of the GAL, are taken care of by the software.
  424.  
  425.  
  426. II.1 The Input File
  427. ----------------------
  428.  
  429. First a source file has to be created with a text editor. This source file
  430. must contain the following information:
  431.  
  432.   1. The GAL type (GAL16V8 or GAL20V8 )
  433.  
  434.   2. an 8 byte long comment, which will be written into the GAL as the
  435.      signature (see I.2)
  436.  
  437.   3. The pin names - here pin numbers are replaced with names, which is
  438.      easier to oversee.
  439.  
  440.   4. The Boolean equations
  441.  
  442.   5. The keyword DESCRIPTION - after this you can place some desired text.
  443.      This text generally describes the GAL's function. That way you can know
  444.      years later what the GAL's intended use was.
  445.  
  446.  
  447. Before it's getting boreing here is a first example (be happy).
  448.  
  449. Example 1:
  450.  
  451. Assuming you need the following gates in your circuit:
  452.  
  453. - one AND  with 3 inputs
  454. - one NAND with 2 Inputs
  455. - one OR with 2 inputs
  456. - one small digital circuit which feeds the outputs from 2 AND gates
  457.   to the inputs of one OR gate.
  458.  
  459. Switch diagram:
  460. (sorry for the European symbols)
  461.  
  462.  
  463.     AND:                +----+            W = A * B * C
  464.               A ----|    |
  465.               B ----| &  |---- W
  466.               C ----|    |
  467.                     +----+
  468.  
  469.     NAND:                +----+            /X = D * E
  470.               D ----|    |
  471.                     | &  |o--- X
  472.               E ----|    |
  473.                     +----+
  474.     OR:
  475.                     +----+            Y = F + G
  476.               F ----|    |
  477.                     | >1 |---- Y
  478.               G ----|    |
  479.                     +----+
  480.  
  481.     small  digital            +----+            Z = H * I + J * K
  482.     circuit:          H ----|    |
  483.                     | &  |----+
  484.               I ----|    |    |   +----+
  485.                     +----+    +---|    |
  486.                           | >1 |---- Z
  487.                     +----+    +---|    |
  488.               J ----|    |    |   +----+
  489.                     | &  |----+
  490.               K ----|    |
  491.                     +----+
  492.  
  493.      Legend:
  494.     * : AND  - connection
  495.     + : OR - Connection
  496.     / : low active
  497.  
  498.  
  499. In order to create the source file we have to determine which type of GAL
  500. will suit our purpose. For the implementation of the above logic functions,
  501. we need a total of 11 inputs and 4 outputs. From chapter I we know
  502. (or not?)  that the type of GAL is dependant on the number of needed inputs.
  503. The number of inputs in turn depends on the mode (see I.4, pin designations
  504. of the various modes). Since neither tristate nor register outputs are used,
  505. the GAL will be in mode 1, after programming. It therefore follows, the
  506. GAL16V8 has 10 inputs and 8 configurable outputs. Since we only need 4
  507. outputs, we can program the rest of the outputs as inputs, so that we
  508. obtain the total required 11 inputs and 4 outputs. Therefore GAL16V8 is
  509. adequate for our purposes. GAL20V8 can also be used, but that leaves a lot
  510. of unused inputs (WASTE !).
  511.  
  512. The second thing we need is a signature for the GAL. Remember, it can
  513. be up to 8 characters long. For example "example".
  514.  
  515. Now we have to define the pins.  The pins are named one after the other
  516. from 1 to 20. Pins that are not used should be named "NC" (not connected),
  517. ground with "GND" and +5V with "VCC".
  518.  
  519. here:    B  C   D   E   F  G  H  I  J  GND
  520.          K  NC  NC  NC  Z  Y  X  W  A  VCC
  521.  
  522. that is:
  523.     Pin  1 := B    Input
  524.     Pin  2 := C    Input
  525.     Pin  3 := D    Input
  526.     Pin  4 := E     Input
  527.     Pin  5 := F    Input
  528.     Pin  6 := G     Input
  529.     Pin  7 := H    Input
  530.     Pin  8 := I    Input
  531.     Pin  9 := J    Input
  532.     Pin 10 := GND    Ground
  533.     Pin 11 := K     Input
  534.     Pin 12 := NC     Not Connected
  535.     Pin 13 := NC    Not Connected
  536.     Pin 14 := NC    Not Connected
  537.     Pin 15 := Z     Combinational Output
  538.     Pin 16 := Y    Combinational Output
  539.     Pin 17 := X     Combinational Output
  540.     Pin 18 := W     Combinational Output
  541.     Pin 19 := A     (Configurable Output defined as Input)
  542.     Pin 20 := VCC    Voltage Supply
  543.  
  544.  
  545.              GAL16V8
  546.             ---- ----
  547.         B  1|       |20  VCC
  548.         C  2|       |19  A
  549.         D  3|       |18  W
  550.         E  4|       |17  X
  551.         F  5|       |16  Y
  552.         G  6|       |15  Z
  553.         H  7|       |14  NC
  554.         I  8|       |13  NC
  555.         J  9|       |12  NC
  556.           GND 10|       |11  K
  557.             ---------
  558.  
  559.  
  560. Next come the Boolean equations:
  561.  
  562.     W  = A * B * C
  563.     /X = D * E
  564.     Y  = F + G
  565.     Z  = H * I + J * K
  566.  
  567. Therewith we have all the parts required for the source file. Now the
  568. question arises, what format does such a file have?:
  569.  
  570. In line 1 must be the type of GAL. Here  "GAL16V8"
  571.  
  572. In line 2 must be the signature. Here  "Example"
  573.  
  574. Then follow the pin declaration:
  575.  
  576.          B  C   D   E   F  G  H  I  J  GND
  577.          K  NC  NC  NC  Z  Y  X  W  A  VCC
  578.  
  579. Then the Boolean Equations:
  580.  
  581.     W = A * B * C
  582.     /X = D * E
  583.     Y = F + G
  584.     Z = H * I + J * K
  585. and the keyword DESCRIPTION.
  586.  
  587. Now using a text editor you can create your source file, and save it with
  588. the title "example.pld". Don't forget the extension ".pld".
  589.  
  590. This is how the file should look:
  591.  
  592. (**** These characters designate the start and end of the file, please
  593. don't type it.)
  594.  
  595. ******************************************************
  596. GAL16V8        here could be a comment
  597. Example        here could be a comment
  598.  
  599. B  C   D   E   F  G  H  I  J  GND
  600. K  NC  NC  NC  Z  Y  X  W  A  VCC
  601.  
  602. W  = A * B * C
  603. /X = D * E
  604. Y  = F + G
  605. Z  = H * I + J * K
  606.  
  607. DESCRIPTION:         here could be a comment
  608.  
  609. ******************************************************
  610.  
  611.  
  612.  
  613. Negations ('/') in the pin declaration are considered in the Boolean
  614. equations. This means, if you use a '/' in the pin declaration and
  615. if you use the related pin in a Boolean equation this pin will be
  616. negated.
  617.  
  618. Example:
  619. --------
  620.  
  621.     A  B  /C  D .....  GND
  622.     K  L  M   N .....  VCC
  623.  
  624.     N = C
  625.  
  626.  
  627.      This is the same:
  628.  
  629.     A  B  C   D .....  GND
  630.     K  L  M   N .....  VCC
  631.  
  632.     N = /C
  633.  
  634.  
  635.  
  636.  
  637. How do you obtain from this source file a programmed GAL? For that you
  638. need the program "GALer".
  639.  
  640.  
  641.  
  642.  
  643. II.2 The Program "GALer"
  644. ------------------------
  645.  
  646. II.2.1 Installation
  647. -------------------
  648.  
  649. GALer needs the req.library in your libs: directory. The req.library is 
  650. copyright by Colin Fox and Bruce Dawson. You can find this library in the
  651. directory ReqLibrary on your GALer disk. Without this library GALer won't
  652. work.
  653.  
  654. Configurations are saved to the file "S:GALer.config". If GALer is started and
  655. can't find this file GALer will use defaults.
  656.  
  657. You can start GALer either from Workbench or CLI.
  658.  
  659.  
  660.  
  661.  
  662. II.2.2 How to use GALer
  663. -----------------------
  664.  
  665.  
  666. All requester can be confirmed or canceled with both mouse or keyboard.
  667.  
  668. You can use the following keys:
  669.  
  670.    "w":         is the same as selecting the "Cont" or "O.K." gadget
  671.    "a" oder ESC: is the same as selecting the "Cancel" gadget
  672.  
  673.    "1":         select "GAL16V8"
  674.    "2":         select "GAL16V8A"
  675.    "3":         select "GAL20V8"
  676.    "4":         select "GAL20V8A"
  677.  
  678.  
  679.  
  680. GALer uses several files which have different extensions like ".pld", ".jed",
  681. ".chp", ".pin", ".fus". If you want to load or save such a file GALer will
  682. choose the right extensions automatically. So you don't have to care about
  683. it. If you don't enter the postfix, GALer will add it.
  684.  
  685.  
  686.  
  687.  
  688.  
  689. II.2.3 Menus
  690. ------------
  691.  
  692. Project:
  693.  About GALer        Tells you who has done all this code. I can tell
  694.             you, I was it.
  695.  
  696.  
  697.  Save config.        Saves some settings to the file "S:GALer.config".
  698.             Starting GALer next time, GALer will read this file
  699.             and set your saved settings again.
  700.  
  701.  
  702.  Quit            Quit quits GALer, but ATTENTION! Handle this function
  703.             with care: If you use Quit too often, GALer will sell
  704.             your Amiga's CPU.
  705.  
  706.             Are you thinking that I'm pulling your leg?
  707.             Ohhhh no..., really not!!! I never would do this.
  708.  
  709.  
  710. GAL-Type:     
  711.   GAL16V8        Here you can select the type of GAL which should be
  712.   GAL20V8        read/programmed next time. Since there are no
  713.   A-Type        principle differences between A and B types there
  714.             is no extra menu for the B types, use the A-Type menu
  715.             instead.
  716.  
  717.  
  718.   Auto-A-Type        If you don't want to care about whether you have a
  719.             A, B type or standard type GAL, select this menu.
  720.             GALer will then notice automatically what type of
  721.             GAL you have inserted in the socket. You only have
  722.             then to choose between 16V8 and 20V8.
  723.  
  724.  
  725.   Type-Requester    Every time when GALer wants to read or program a GAL
  726.             GALer will bring up a requester in which you can
  727.             select the type of GAL you want to read or program.
  728.             This selection overrides the selection in the
  729.             GAL16V8, GAL20V8 and A-Type menus.
  730.             If you don't want this behavior of GALer, deselect
  731.             the Type-Requester menu. GALer will then not bring up
  732.             a requester.
  733.  
  734.  
  735. GAL:
  736.   Program          Program a GAL. This is the most importent function of
  737.             GALer. After selecting this menu, GALer will bring
  738.             up a file requester in which you can select the
  739.             JEDEC-file which should be programmed into the GAL.
  740.  
  741.  
  742.   Copy            Copy a GAL. You can only copy a GAL if the security
  743.             bit of the source file is not set and if the
  744.             destination GAL is not programmed.
  745.  
  746.  
  747.   Erase            Erase a GAL. If you want to program a GAL the GAL
  748.             must be erased. Do this with this function.
  749.  
  750.  
  751.   Compare        There are three different types of comparison. You
  752.             can compare a GAL with several GALs, a GAL with
  753.             several JEDEC files or a JEDEC file with several
  754.             GALs.
  755.  
  756.  
  757.   Blank test        Test whether the GAL is erased or not.
  758.  
  759.  
  760.   Set security bit    Set the security bit of a GAL. The logic matrix of
  761.             such a protected GAL can't be read out after doing
  762.             this.
  763.  
  764.  
  765.   Test security bit    Test whether the security bit of a GAL is set or not.
  766.  
  767.  
  768.   Write access        This function brings up a requester. In this
  769.             requester you can select what GALer should do before
  770.             or after programming, copying or erasing a GAL.
  771.  
  772.             programming:
  773.                  - with blank test: before programming a GAL test
  774.                         whether it is erased or not
  775.                  - with verify    : verify GAL after programming
  776.  
  777.  
  778.             copying:
  779.                  - with blank test: test destination GAL whether
  780.                         it is erased or not
  781.                  - with verify    : verfiy programmed destination
  782.                         GAL
  783.  
  784.             erasing:
  785.                  - with blank test: test after erasing a GAL
  786.                         whether it is really cleared
  787.                         or not
  788.  
  789.  
  790. GAL-Assembler:
  791.  Assemble file        Assemble a source file (name.pld) and generate
  792.             the JEDEC file and some    special files.
  793.  
  794.  
  795.  
  796. GAL-Disassembler:
  797.  Read signature      Read signature of a programmed GAL and print it
  798.             on the screen.
  799.  
  800.  
  801.  Read ACW        Read the architecture control word of a GAL and
  802.             print it on the screen.
  803.  
  804.  
  805.  GAL-Info        Gives you some information about your GAL.
  806.  
  807.  
  808.  generate JEDEC-file    Read a GAL and make a corresponding JEDEC file.
  809.  
  810.  
  811.  JEDEC-file parameter    Selecting this menu puts up a requester in which
  812.             you can determine parameters concerning the writing
  813.             of JEDEC files.
  814.  
  815.             Security bit: If this is enabled, GALer will write
  816.             JEDEC files in which a special flag is set.
  817.             Reading this JEDEC file to program a GAL will bring
  818.             up a requester in which you can choose to set the
  819.             security bit after programming or not.
  820.  
  821.             Fuse-Checksum: If this is enabled, GALer will write
  822.             JEDEC files with a checksum calculated over all
  823.             fuses. Manually changed fuses (with text editor)
  824.             will be    detected by GALer and GALer will warn you
  825.             that this JEDEC file has been changed when reading
  826.             this file next time. You are allowed to change
  827.             comments etc. but you are not allowed to change
  828.             fuses ('0' and '1').
  829.  
  830.             File-Checksum: If this is enabled, GALer will write
  831.             JEDEC files with a checksum calculated over all
  832.             characters in this file. This means that you are
  833.             not allowed to change anything in this file
  834.             by using a text editor.
  835.  
  836.  
  837.  Reassembler        This function reads a JEDEC file and generates then
  838.             the original source file. So you can read a unkown
  839.             GAL and get back a source file with the Boolean
  840.             equations.
  841.  
  842.  
  843.  
  844. Tools:
  845.  Show pinnames        Prints the pin names of the last assembled source
  846.             file on the screen.
  847.  
  848.  
  849.  Clear pinnames        Clears pin names from screen.
  850.  
  851.  
  852.  GAL-Checker        There you can check a programmed GAL whether it does
  853.             this what you want to do it or not. See corresponding
  854.             paragraph.
  855.  
  856.  
  857.  Optimizer        Optimize Boolean equations. See corresponding
  858.             paragraph.
  859.  
  860.  
  861.  
  862.  
  863. II.2.4 Assembler
  864. ----------------
  865.  
  866. In order to program a GAL the source file (".pld") must be transposed into a
  867. so called JEDEC file. This task is assumed by the GAL-Assembler. The
  868. JEDEC file (extension ".jed") is a ASCII file in which all the bits which
  869. can be set in a GAL are listed. The state of the fuses (0 or 1) is
  870. mediated by the GAL-Assembler from the source file. Besides the JEDEC file,
  871. the GAL-Assembler can generate three other files. This files are for
  872. documentation only. GALer do not need them:
  873. The Fuse-File (extension ".fus") shows the state of the bits in the
  874. logic matrix. The Chip-Diagram (extension ".chp") shows the connection
  875. diagram of the GAL and the Pin-Diagram file (extension ".pin") lists
  876. all the pins and shows, whether these are programmed as inputs or outputs.
  877. The files can be read with a text-editor and possibly post-processed.
  878.  
  879.  
  880. Selecting the menu 'Assemble file' pops up a requester, called
  881. assembler requester. In the assembler requester you can select which
  882. files should be generated by the assembler. Just click on the corresponding
  883. gadget.
  884.  
  885. Furthermore you can select two other gadgets:
  886.  
  887.   Autosave: This means that all selected files are generated
  888.         automatically without bringing up an extra file requester.
  889.         The name of the generated files are taken from the
  890.         source file name.
  891.  
  892.   Adjust type of GAL: This means that the type of GAL for which the
  893.         source file is, is taken over from GALer.
  894.         For example: You have set a GAL20V8 in GALer's menu.
  895.         Now you are assembling a source file for a GAL16V8. If the
  896.         assembly is successful, GAL16V8 will be set in GALer's menu.
  897.  
  898.  
  899.  
  900. Selecting the 'Count' (countinue) gadget of the assembler requester
  901. will pop up a file requester. Now you have to choose your source
  902. file. After this the GAL assembler will start assembling. If GALer
  903. detects no errors, a second file requester will pop up. Now you have
  904. to save your JEDEC file.
  905.  
  906.  
  907.  
  908.  
  909. II.2.5    How to Program GALs
  910. ---------------------------
  911.  
  912. After the GAL-Assembler has created the JEDEC file from the source file,
  913. the GAL can be programmed using this JEDEC file. To initiate the
  914. programming of the GAL, simply select 'Program' and give the JEDEC file
  915. name. As soon as the GAL is programmed, a requester pops up, and tells
  916. you the GAL is programmed, and it is OK to remove the GAL from the
  917. programmer's socket.
  918.  
  919.  
  920. The steps in programming a GAL:
  921.  
  922.   1. With a Text editor create the source file and save this
  923.      file as "name.pld" (add the extension .pld!)
  924.  
  925.   2. Assemble the source file  -> JEDEC file ("name.jed")
  926.  
  927.   3. Select the GAL type (GAL16V8, GAL20V8)
  928.  
  929.   4. Insert the GAL in the Programmer's socket
  930.  
  931.   5. Perform the 'Blank test' to verify that the GAL is empty.
  932.      When the GAL is not empty, then you must first erase the GAL
  933.      before it can be programmed, use therefore the function 'Erase'.
  934.  
  935.   6. Initiate programming by selecting 'Program'.
  936.  
  937.   7. Take the GAL out of the programmer's socket, -  DONE !
  938.  
  939.  
  940.  
  941.  
  942.  
  943. II.2.6 How to Test Programmed GALs
  944. ----------------------------------
  945.  
  946. Once the GAL has been programmed, the question remains, "does it work the
  947. way you envisaged it?". This is the purpose of the GAL-Checker. In order to 
  948. verify the GAL's functions, you must of course first plug the GAL into the 
  949. programmer's socket, and select the correct GAL-type. Now you can select
  950. the menu item GAL-Checker. In the middle of the screen you'll see a
  951. symbolic GAL displayed. In this GAL, you'll see a number of 'I's and 'O's.
  952. The 'I' stands for Input and the 'O' for Output. The 'O' is a gadget. By
  953. clicking on the 'O' it turns into an 'I' and clicking on it again it
  954. becomes an 'O' again. In other words, you can determine if this pin is
  955. to be used as an input or an output. If a pin is an input, then you can
  956. select from another gadget if the pin is to be in a  "High" ('H') or in a
  957. "Low" ('L') state. The outputs have a green border. An output can assume
  958. three states: 'H' (High), 'L' (Low) and 'Z' (high impedance). If you're
  959. using the GAL  from  the  above  example,  pin  19  must be defined as an
  960. input (="A") by clicking on the 'O' (the one by pin 19), since this pin
  961. was defined as an input during  programming in the above example.  The
  962. inputs of the AND gate are:  pin 19  (="A"),  pin  1 (="B"), pin 2 (="C").
  963. The output is pin 18 (="W").  If you now  set the inputs of the AND gate
  964. HIGH (by clicking on the gadgets), the output (=pin 18) should also go
  965. HIGH.  If it doesn't work or if the output also goes high  with  other
  966. combinations  of  input  levels, then the fault is probably in the source
  967. file.  The error should be corrected in the source file.  The GAL must
  968. then be erased and reprogrammed (a  GAL  can be erased and reprogrammed at
  969. least a hundred times). In  this  manner  the  whole  GAL  can  be fully
  970. tested, and if no errors are detected, can be used in your circuit.
  971.  
  972.  
  973.  
  974.  
  975.  
  976. II.2.7 Optimizer
  977. ----------------
  978.  
  979. Boolean equations can be simplified very often, but for human beings
  980. it is a hard way to do. A computer can do this much faster (in most
  981. times). The Optimizer of GALer tries to optimize Boolean equations
  982. by use of the Quine-McCluskey algorithm. How this algorithm works
  983. you can read in many books which deal with Boolean mathamatics.
  984.  
  985. The usage of the Optimizer:
  986.  
  987.    Just select the menu 'Tools - Optimizer' to start GALer's Optimizer.
  988.    After this a file requester pops up. Now you have to select the source
  989.    file which equations you want to be optimized.
  990.    After successfully loading this source file GALer starts to optimize
  991.    the equations.
  992.    GALer displays the original equation and the optimized one. If you
  993.    are happy with the result of the optimization you should select the
  994.    gadget 'use it'. Then the original equation is replaced by the
  995.    optimized equation in your loaded source file. If you don't like the
  996.    result of the optimization, you should select the gadget 'reject'. Then
  997.    the original equation is not replaced. After trying to optimize all
  998.    equations GALer will pop up a file requester again. Now you have to
  999.    select a file name of your optimized source file. Please don't use the
  1000.    file name of the original source file for the optimized source file.
  1001.  
  1002.  
  1003.    Example of optimization:
  1004.  
  1005.      Original Boolean equation:
  1006.  
  1007.      X = /A*/C + A*/C + C*/D + /B*/C + /A*C*D + B*/D
  1008.  
  1009.      By GALer optimized Boolean equation:
  1010.  
  1011.      X = /C + /D + /A
  1012.  
  1013.    Both equations are equal, but the second one is much easier to read.
  1014.  
  1015.  
  1016. Not all equations can be simplified. It could be that a "optimized"
  1017. equation is more complicate than the original one. Just try it.
  1018.  
  1019.  
  1020.  
  1021.  
  1022. II.3 JEDEC File
  1023. ---------------
  1024.  
  1025. JEDEC means (J)oint (E)lectron (D)evice (E)nineering (C)ouncil.
  1026. This file is a ASCII file in which every bit which can be set in a
  1027. GAL is listed. The JEDEC file has the extension ".jed" and it's
  1028. generated by the GAL-Assembler.
  1029.  
  1030.  
  1031. The JEDEC file can start with any text until there is a asterisk (*).
  1032. The first '*' introduces the command field. The command field starts
  1033. with the first '*' and ends at the file end. Within the command field
  1034. are... (now be astonished) commands! A command is introduced by one
  1035. character and it ends with a '*' character.
  1036.  
  1037. All commands are optional. Not every command must be in a JEDEC file.
  1038. The GAL-Assembler normaly uses: L, F and G commands (see below)
  1039.  
  1040.  
  1041. Possible commands are:
  1042.  
  1043.  
  1044.  N: This introduces a comment.
  1045.     Example:   N this is a comment *
  1046.  
  1047.            ^    ^       ^
  1048.            |    |       |
  1049.      command    any text    end of command
  1050.  
  1051.  
  1052.  
  1053.  F: You don't have to list all states of the fuses in the GAL. If you don't
  1054.     list all fuses GALer must know what the state of the missed fuses is.
  1055.     
  1056.     F0 *: not listed fuses are set to 0
  1057.     F1 *: not listed fuses are set to 1
  1058.  
  1059.  
  1060.  
  1061.  G: Security Fuse
  1062.  
  1063.     G0 *: don't set the security fuse after programming the GAL
  1064.     G1 *: ask user (you) whether to set the security fuse after
  1065.       programming the GAL or not
  1066.  
  1067.  
  1068.  L: L defines the address of a fuse and what the state of the fuse
  1069.     should be.
  1070.  
  1071.     Example:  L0000  10110111111111111111111111011111 *
  1072.  
  1073.     this means:  set fuse at address 0 to 1
  1074.              set fuse at address 1 to 0
  1075.              set fuse at address 2 to 1
  1076.                 .
  1077.                 .
  1078.                 .
  1079.  
  1080.     possible addresses are:
  1081.  
  1082.     GAL16V8, GA16V8A, GAL16V8B:
  1083.       0000-2047: matrix of fuses
  1084.       2048-2055: XOR bits
  1085.       2056-2119: signature
  1086.       2120-2127: AC1 bits
  1087.       2128-2191: product term disable bits
  1088.       2192     : SYN bit
  1089.       2193     : AC0 bit            
  1090.  
  1091.     GAL20V8, GAL20V8A, GAL20V8B:
  1092.       0000-2559: matrix of fuses
  1093.       2560-2567: XOR bits
  1094.       2568-2631: signature
  1095.       2632-2639: AC1 bits
  1096.       2640-2703: product term disable bits
  1097.       2704     : SYN bit
  1098.       2705     : AC0 bit
  1099.  
  1100.  
  1101.  
  1102.  QF: Defines how many fuses in the JEDEC file are. A GAL16V8 has
  1103.      2194 fuses and a GAL20V8 has 2706 fuses. Now GALer can
  1104.      identify for which type of GAL this JEDEC file is.
  1105.  
  1106.      Example: QF2194 *
  1107.  
  1108.  
  1109.  
  1110.  C: C is followed by a 16 bit hex number which is the fuse checksum of
  1111.     the JEDEC file (see description of menu 'JEDEC-file parameter').
  1112.  
  1113.     Example: C6402 *
  1114.  
  1115.  
  1116.  
  1117.  <STX>, <ETX>: This are control characters.
  1118.     <STX>: 0x02 = CTRL-B
  1119.     <ETX>: 0x03 = CTRL-C
  1120.  
  1121.     Your text editor displays this characters in this way:
  1122.       <STX>  
  1123.       <ETX>  
  1124.     <STX> defines the start of the JEDEC file and <ETX> the end of the
  1125.     JEDEC file. <ETX> is followed by the file checksum (see description
  1126.     of menu 'JEDEC file-parameter'). The file checksum is a 16 bit hex
  1127.     number.
  1128.  
  1129.  
  1130.  
  1131.  V: V introduces a test vector. GALer 1.4 does not support this. GALer
  1132.     interprets this command as a N command (comment).
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140. II.3 Further Examples
  1141. ----------------------
  1142.  
  1143. Next I want to show an example with a tristate output.
  1144. (sorry again for the European symbols)
  1145.  
  1146.       /A ---------+
  1147.         |\|
  1148.         | \
  1149.        B -------|  +------------------------ Y1
  1150.         | /                
  1151.         |/                
  1152.                   VCC
  1153.                    |
  1154.             +----+         |\|
  1155.        C -------|    |         | \
  1156.             | >1 |-----------|  +------- Y2
  1157.        D -------|    |         | /
  1158.             +----+         |/
  1159.  
  1160.  
  1161.             +----+
  1162.        E -------|    |
  1163.             | &  |------+
  1164.        F -------|    |      |
  1165.             +----+      |
  1166.               |\|
  1167.                           | \
  1168.        G -----------------|  +o------------- Y3
  1169.               | /
  1170.                       |/
  1171.  
  1172.  
  1173.  
  1174. Y1 should only be in the "B" state, when "A" = LOW. Y2 should always be
  1175. active (either HIGH or LOW - depending on "B" and "C"). This corresponds
  1176. to a combinational output. Y3 should only be active if "D" and "E" = HIGH.
  1177.  
  1178.  
  1179.              GAL16V8
  1180.             ---- ----
  1181.         A  1|       |20  VCC
  1182.         B  2|       |19  Y1
  1183.         C  3|       |18  Y2
  1184.         D  4|       |17  Y3
  1185.         E  5|       |16  NC
  1186.         F  6|       |15  NC
  1187.         G  7|       |14  NC
  1188.            NC  8|       |13  NC
  1189.            NC  9|       |12  NC
  1190.           GND 10|       |11  NC
  1191.             ---------
  1192.  
  1193. In the source file, tristate outputs are designated with a ".T". The
  1194. tristate control is followed with an ".E". If the tristate control
  1195. is absent then the normal free switching is assumed (=VCC). Tristate
  1196. control = GND means high impedance. NOTE: With tristate outputs you can
  1197. only have seven product terms in your equation (all other output formats
  1198. have a maximum of eight). In the tristate control you can only have ONE
  1199. product term (no OR) in your equation.
  1200.  
  1201. The Source file looks like this:
  1202.  
  1203. ******************************************************
  1204.  
  1205. GAL16V8
  1206.  
  1207. ex.2
  1208.  
  1209. A  B  C  D  E  F  G  NC NC GND
  1210. NC NC NC NC NC NC Y3 Y2 Y1 VCC
  1211.  
  1212. Y1.T = B
  1213.  
  1214. Y2.T = C + D
  1215.  
  1216. Y3.T = /G
  1217.  
  1218. Y1.E = /A
  1219.  
  1220. Y3.E = E * F
  1221.  
  1222.  
  1223. DESCRIPTION
  1224. ******************************************************
  1225.  
  1226.  
  1227.  
  1228. For the last example we will deal with register outputs.
  1229.  
  1230. First the pin declaration:
  1231.  
  1232.  
  1233.                 GAL16V8
  1234.  
  1235.                ---- ----
  1236.          (Input)       Clock  1|       |20  VCC
  1237.     (Input)          D0  2|       |19  Q0        (Output)
  1238.     (Input)          D1  3|       |18  Q1        (Output)
  1239.     (Input)          D2  4|       |17  Q2        (Output)
  1240.     (Input)          D3  5|       |16  Q3        (Output)
  1241.     (Input)         Set  6|       |15  NC        (not used)
  1242.     (Input)       Clear  7|       |14  NC        (not used)
  1243.     (Input)          NC  8|       |13  NC        (not used)
  1244.     (Input)          NC  9|       |12  NC        (not used)
  1245.              GND 10|       |11  /OE        (Input)
  1246.                    ---------
  1247.  
  1248.  
  1249. Since register output sets the GAL in mode 3, this means that pins 1
  1250. and 11 are reserved for Clock and /OE. When /OE is HIGH, all register
  1251. outputs (Q0-Q3) go to "high impedance" (=Z). When LOW-HIGH transition
  1252. pulse is presented at the clock input, then the counter will be 
  1253. incremented. When Clear = HIGH and a (LOW-HIGH) clock transition occurs,
  1254. the outputs are cleared. The inputs D0-D3 can be used to preset the
  1255. counter. While Set = HIGH and a Clock pulse the values in D0-D3 are
  1256. transferred to Q0-Q3.
  1257.  
  1258. In the source file register outputs are designated with an ".R".
  1259.  
  1260. ******************************************************
  1261. GAL16V8            4-Bit-Counter
  1262. Counter
  1263.  
  1264.  
  1265. Clock D0    D1    D2    D3    Set   Clear NC    NC   GND
  1266. /OE   NC    NC    NC    NC    Q3    Q2    Q1    Q0   VCC
  1267.  
  1268.  
  1269.  
  1270. Q0.R =   /Clear *  Set *  D0
  1271.        + /Clear * /Set * /Q0
  1272.  
  1273. Q1.R =   /Clear *  Set *  D1
  1274.        + /Clear * /Set * /Q1 *  Q0
  1275.        + /Clear * /Set *  Q1 * /Q0
  1276.  
  1277. Q2.R =   /Clear *  Set *  D2
  1278.        + /Clear * /Set *  Q2 * /Q1
  1279.        + /Clear * /Set *  Q2 * /Q0
  1280.        + /Clear * /Set * /Q2 *  Q1 *  Q0
  1281.  
  1282. Q3.R =   /Clear *  Set *  D3
  1283.        + /Clear * /Set *  Q3 * /Q2
  1284.        + /Clear * /Set *  Q3 * /Q1
  1285.        + /Clear * /Set *  Q3 * /Q0
  1286.        + /Clear * /Set * /Q3 *  Q2 *  Q1 *  Q0
  1287.  
  1288.  
  1289. DESCRIPTION
  1290. ******************************************************
  1291.  
  1292.  
  1293.  
  1294.  
  1295. II.5 Error Messages
  1296. -------------------
  1297.  
  1298. Now I want to describe all possible error messages which GALer can
  1299. create.
  1300.  
  1301.  
  1302. II.5.1 Assembler
  1303. ----------------
  1304.  
  1305.  
  1306. "Line  1: type of GAL expected"
  1307.    The first line of your source file must define for what type of GAL
  1308.    this source file is. So the first line must contain one of the
  1309.    following keywords: GAL16V8, GAL20V8, GAL16V8A, GAL20V8A
  1310.  
  1311.  
  1312. "unexpected end of file"
  1313.    Normaly this error occurs when there is no DESCRIPTION keyword
  1314.    at the end of your Boolean equations.
  1315.  
  1316.  
  1317. "pin name expected after '/'"
  1318.    A '/' must be followed by a pin name. If there is a '/' but no pin name
  1319.    this error will occur.
  1320.  
  1321.  
  1322. "max. length of pin name is 8 characters"
  1323.    Pin names are not allowed to be longer than 8 characters.
  1324.  
  1325.  
  1326. "illegal character in pin declaration"
  1327.    In a pin name is a character which is not allowed to use. Possible
  1328.    characters are: a..z, A..Z, 0..9, /
  1329.  
  1330.  
  1331. "illegal VCC/GND assignment"
  1332.    VCC and GND are keywords. It's not allowed to use this words for
  1333.    other pins. Use it only for the pins VCC and GND.
  1334.  
  1335.  
  1336. "pn declaration: expected VCC at VCC pin"
  1337.    The pin VCC must have the name VCC.
  1338.  
  1339.  
  1340. "pin declaration: expected GND at GND pin"
  1341.    The pin GND must have the name GND.
  1342.  
  1343.  
  1344. "pin name defined twice"
  1345.    In the pin declaration a pin name is used multiple.
  1346.  
  1347.  
  1348. "illegal use of '/'"
  1349.    Negations ('/') must be followed by a pin name. 
  1350.  
  1351.  
  1352. "unknown pin name"
  1353.    Within a Boolean equation is a undefined pin name.
  1354.  
  1355.  
  1356. "NC (Not Connected) is not allowed in logic equations"
  1357.    NC is a keyword for unused pins. So don't use this in your
  1358.    Boolean equations.
  1359.  
  1360.  
  1361. "'T', 'E' or 'R' expected after '.'"
  1362.    A '.' must be followed by a T, E or R. This defines an output pin
  1363.    as tristate or register. E defines a equation for the tristate
  1364.    enable.
  1365.  
  1366.  
  1367. "'=' expected"
  1368.    A '=' is expected but not found (what else should I say).
  1369.  
  1370.  
  1371. "this pin can't be used as output"
  1372.    You have tried to define a pin as output which can't be used as output.
  1373.  
  1374.  
  1375. "same pin is defined multible as output"
  1376.    It's easier to show an example:
  1377.      X = ...
  1378.      X = ...
  1379.    This brings up this error message.
  1380.  
  1381.  
  1382. "Tristate control: tristate output is not defined"
  1383.    You have defined a Boolean equation for tristate enable but there
  1384.    was no Boolean equation for the trisate output.
  1385.    The order must be:
  1386.      name.T = ...
  1387.      name.E = ...
  1388.  
  1389.    Possibly you have done:
  1390.      name.E = ...
  1391.      name.T = ...
  1392.    this is wrong!
  1393.  
  1394.  
  1395. "Mode 2: pins 12, 19 can't be used as input"
  1396.    The GAL would be in mode 2. In this mode you can't define the pins
  1397.    12 and 19 as input pins. This pins do not have a feedback too. This
  1398.    means that the following equation is not allowed.
  1399.  
  1400.      a := pin 19
  1401.      b := pin 4
  1402.      y := pin 17
  1403.  
  1404.      a = b        a is output, b is input
  1405.      y = a * b        y is output
  1406.             a is used as input, this is not allowed in mode 2
  1407.             because there is on feedback
  1408.  
  1409. "Mode 2: pins 15, 22 can't be used as input"
  1410.    The GAL would be in mode 2. In this mode you can't define the pins
  1411.    15 and 22 as input pins. This pins do not have a feedback too. This
  1412.    means that the following eqauation is not allowed.
  1413.  
  1414.      a := pin 22
  1415.      b := pin 4
  1416.      y := pin 17
  1417.  
  1418.      a = b        a is output, b is input
  1419.      y = a * b        y is output
  1420.             a is used as input, this is not allowed in mode 2
  1421.  
  1422.  
  1423. "Tristate control is defined twice"
  1424.    Example:    name.E = A * B
  1425.            name.E = C
  1426.    this is not allowed!
  1427.  
  1428.  
  1429.  
  1430. "Tristate control for registered output"
  1431.    name.E is only allowed for tristate outputs. You have used it for a
  1432.    register output.
  1433.  
  1434.  
  1435. "Tristate control without previous '.T'"
  1436.    There is a tristate control for a combinational output.
  1437.    wrong:    name   = ...
  1438.         name.E = ...
  1439.  
  1440.    right:    name.T = ...
  1441.         name.E = ...
  1442.  
  1443.  
  1444. "use GND, VCC instead of /VCC, /GND"
  1445.    I think there is nothing to explain.
  1446.  
  1447.  
  1448. "Mode 3: pins 1,11 are reservated for 'Clock' and '/OE'"
  1449.    Using register outputs causes mode 3 for the GAL. In this mode the
  1450.    pins 1 and 11 of a GAL16V8 can't be used by your own. This pins are
  1451.    reserved for Clock and /OE.
  1452.  
  1453.  
  1454. "Mode 3: pins 1,13 are reservated for 'Clock' and '/OE'"
  1455.    Using register outputs causes mode 3 for the GAL. In this mode the
  1456.    pins 1 and 13 of a GAL20V8 can't be used by your own. This pins are
  1457.    reserved for Clock and /OE.
  1458.  
  1459.  
  1460. "use of VCC and GND is not allowed in equations"
  1461.    Expressions like  "X = A * VCC" are not allowed (and not necassary).
  1462.  
  1463.  
  1464. "Tristate control: only one product term allowed (no '+')"
  1465.    In Boolean equations for tristate controls only one product
  1466.    term can be used. This means no ORs in your name.E=... equation.
  1467.  
  1468.  
  1469. "max. 8 product terms allowed"
  1470.    In Boolean equations for combinational and register outputs a maximum
  1471.    of eight product terms is allowed. This means that you can use a
  1472.    maximum of seven ORs in your equations.
  1473.  
  1474.    
  1475. "max. 7 product terms allowed"
  1476.    In Boolean equations for tristate outputs a maximum of seven product
  1477.    terms is allowed. This means that you can use a maximum of six ORs in
  1478.    your equations. The eighth product term is used for the tristate control.
  1479.  
  1480.  
  1481. "no equations found"
  1482.    Sorry, but there are no Boolean equations in your source file. So GALer
  1483.    does not know what to do with your source file.
  1484.  
  1485.  
  1486.  
  1487.  
  1488. II.5.2 JEDEC File
  1489. -----------------
  1490.  
  1491.  
  1492. "unexpected end of file"
  1493.    The last thing in a JEDEC file should be either the file checksum or
  1494.    a '*'.
  1495.  
  1496.  
  1497. "unknown command found"
  1498.    There is a unknown command in your JEDEC file (see chapter JEDEC File for
  1499.    possible commands). In most cases the reason for this error message
  1500.    is a missing '*'.
  1501.  
  1502.  
  1503. "bad format of number"
  1504.    A dez. or hex. number is expected and found, but there are illegal
  1505.    characters in it.
  1506.    Example:  C1a#3      
  1507.  
  1508.  
  1509. "number expected after command"
  1510.    After this command a dez. or hex. number is expected but not found.
  1511.  
  1512.  
  1513. "0 or 1 expected"
  1514.    Fuses can be set to 0 or 1. Using another digit will cause this error.
  1515.  
  1516.  
  1517. "can't find out type of GAL"
  1518.    GALer can't identify for which type of GAL (GAL16V8 or GAL20V8) this
  1519.    JEDEC file is. But GALer must know this in order to program a GAL.
  1520.  
  1521.  
  1522. "QF multible found"
  1523.    In the JEDEC file the command QF is found multiple. This is not
  1524.    allowed.
  1525.  
  1526.  
  1527. "QP multible found"
  1528.    In the JEDEC file the command QP is found multiple. This is not
  1529.    allowed.
  1530.  
  1531.  
  1532. "ending '*' expected"
  1533.    GALer expects a '*' character.
  1534.  
  1535.  
  1536. "after 'C' command no 'L' command allowed"
  1537.    After the fuse checksum no change of fuses (L command) is allowed.
  1538.  
  1539.  
  1540. "bad fuse checksum"
  1541.    The fuse checksum is bad. The reason for this can be that you have
  1542.    changed some state of fuses with a text editor.
  1543.  
  1544.  
  1545. "too many <STX> (= CTRL-B, 0x02) found"
  1546.    The <STX> control character should be once at the beginning of the
  1547.    JEDEC file.
  1548.  
  1549.  
  1550. "too many <ETX> (= CTRL-C, 0x03) found"
  1551.    The <ETX> control character should be once at the end of the
  1552.    JEDEC file.
  1553.  
  1554.  
  1555. "bad sequence of <STX>, <ETX>"
  1556.    The first control character must be a <STX> then a <ETX> not vice versa.
  1557.  
  1558.  
  1559. "after file checksum end of file expected"
  1560.    There is a character after a file checksum which is not a Space, TAB
  1561.    or Carriage Return. This is not allowed.
  1562.  
  1563.  
  1564. "bad fuse address (L... too short)"
  1565.    It's easier to show an example:
  1566.          L0010 1011*
  1567.       L0013 0111*
  1568.       Address 13 is defined twice.
  1569.  
  1570.  
  1571. "addresses skiped but no default value (F0/1*) defined"
  1572.    It's easier to show an example:
  1573.       L0010 11*
  1574.       L0015 01*
  1575.     The fuses of the addresses 12, 13 and 14 are not defined and there
  1576.     is no F command which would define the values of missing fuses.
  1577.  
  1578.  
  1579. "'*' expected"
  1580.    '*' expected but not found (what else should I say here).
  1581.  
  1582.  
  1583. "QF... and last fuse address (L...) are not equal"
  1584.    QF defines the number of fuses in this JEDEC file (GAL16V8: 2194,
  1585.    GAL20V8: 2706). If the last fuse of a L command does not match
  1586.    to the QF command, this error will occur.
  1587.  
  1588.  
  1589. "no values for the fuses found (no F0/1, L...)"
  1590.    In your JEDEC file are no fuses defined. Such a file is useless
  1591.    and therefore rejected by GALer.
  1592.  
  1593.  
  1594. "only QF2194* (GAL16V8) and QF2706* (GAL20V8) allowed"
  1595.    There is a QF command followed with a number not equal 2194 or 2706.
  1596.  
  1597.  
  1598. "too many fuses found (>2706)"
  1599.    In your JEDEC file are too many fuses defined.
  1600.  
  1601.  
  1602. "found several fuse checksumms"
  1603.    In your JEDEC file are several fuse checksumms. This is not allowed.
  1604.  
  1605.  
  1606. "selected type of GAL fits not to JEDEC file"
  1607.    You have selected a to-be-programmed-GAL which does not fit to
  1608.    the JEDEC file.
  1609.  
  1610.  
  1611.  
  1612.  
  1613. II.5.3 Reassembler
  1614. ------------------
  1615.  
  1616.  
  1617. "Mode AC0 = SYN = 0 is not supported"
  1618.    In the JEDEC file the bits AC0 and SYN are set to 0. This mode
  1619.    is not supported by GALer.
  1620.  
  1621.  
  1622. "Pin xx: pin name defined twice"
  1623.    A pin name is used for more than one pin.
  1624.  
  1625.  
  1626. "Pin xx: illegal character"
  1627.    Legal characters are  : digits, letters and the '/'
  1628.    Illegal characters are: Space, #, *, ...
  1629.  
  1630.  
  1631. "Pin xx: no pin name found"
  1632.    There is no name for the pin xx defined.
  1633.  
  1634.  
  1635. "Pin xx: VCC/GND at wrong pin"
  1636.    VCC and GND must be the pin names for the VCC and GND pin of the GAL.
  1637.  
  1638.  
  1639. "Pin xx: illegal use of '/'"
  1640.    Usage of the negation character: /pinname
  1641.    Illegal:  pinname/, /, //pinname etc.
  1642.  
  1643.  
  1644. "Pin xx: GND expected"
  1645.    Pin 10 of GAL16V8 respectively pin 12 of GAL20V8 must be defined as GND.
  1646.  
  1647.  
  1648. "Pin xx: VCC expected"
  1649.    Pin 20 of GAL16V8 respectively pin 24 of GAL20V8 must be defined as VCC.
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655. Chapter III: The Hardware
  1656. =========================
  1657.  
  1658. III.1 Programming GALs
  1659. ----------------------
  1660.  
  1661. The first question that arises is how can you program a GAL when all the
  1662. pins are already defined and no pins are free for the programming. If
  1663. you apply a voltage of 16.5 V  to pin 2 of a GAL, then the pin description
  1664. change, the GAL is then in the Edit mode.
  1665.  
  1666.  
  1667.                 GAL16V8
  1668.                 ---- ----
  1669.                VIL   1|       |20  +5V
  1670.             EDIT   2|       |19  P,/V
  1671.             RAG1   3|       |18  RAG0
  1672.             RAG2   4|       |17  VIL
  1673.             RAG3   5|       |16  VIL
  1674.             RAG4   6|       |15  VIL
  1675.             RAG5   7|       |14  VIL
  1676.             SCLK   8|       |13  VIL
  1677.             SDIN   9|       |12  SDOUT
  1678.             GND   10|       |11  /STR
  1679.                 ---------
  1680.  
  1681.  
  1682.                 GAL20V8
  1683.                 ---- ----
  1684.                  VIL   1|       |24  +5V
  1685.             EDIT   2|       |23  VIL
  1686.             RAG1   3|       |22  P,/V
  1687.             RAG2   4|       |21  RAG0
  1688.             RAG3   5|       |20  VIL
  1689.                VIL   6|       |19  VIL
  1690.              VIL   7|       |18  VIL
  1691.             RAG4   8|       |17  VIL
  1692.             RAG5   9|       |16  VIL
  1693.             SCLK  10|       |15  SDOUT
  1694.             SDIN  11|       |14  VIL
  1695.              GND  12|       |13  /STR
  1696.                 ---------
  1697.  
  1698.  
  1699. Whether the GAL is to be read from or written to is determined by the level
  1700. of P,/V. A HIGH means write, a LOW read. The to be read/written addresses
  1701. are presented to pins RAG0-RAG5. The programming occurs as follows: After
  1702. giving the addresses to RAG0-RAG5, the to be written bits have to be
  1703. presented to SDIN (serially) and by clocking SCLK with a LOW-HIGH-transition
  1704. the data is transferred to an internal shift register. A LOW-pulse on the
  1705. /STR pin programs the addressed row. This repeats until the whole GAL is
  1706. programmed.
  1707. The reading of a GAL proceeds similarly: After presenting the addresses to
  1708. RAG0-RAG5 the bits of the corresponding address are put into the internal
  1709. shift register by clocking /STR with a LOW-pulse. By clocking SCLK with a
  1710. LOW-HIGH-clock transition all the various bits are sent out the SDOUT pin.
  1711. The bit width of an address determines the number of SCLK pulses required
  1712. to complete the programming or reading the address.
  1713.  
  1714. VIL means Input Voltage Low. This pins must be connected to ground
  1715. or LOW when the GAL is in the Edit mode.
  1716.  
  1717. GALs do have different algorithm codes. This codes determine the parameters
  1718. Edit mode voltage and STR pulse width. GALer supports the algorithm codes
  1719. 0 to 4. The function 'GAL-Info' of GALer returns the algorithm code of
  1720. the inserted GAL. This code is not very importent for you, but GALer needs
  1721. this code for reading and programming GALs.
  1722.  
  1723.  
  1724.  
  1725.         |              READ         |         PROGRAM
  1726. ------------+----------------------------+----------------------------
  1727.  Algorithm  |  Edit mode    | STR pulse  |   Edit mode    | STR pulse
  1728.         | read voltage  |         | prog. voltage  |
  1729. ------------+---------------+------------+----------------+-----------
  1730.       0 |  12 ± 0,25 V  |    5 us     | 15,75 ± 0,25 V | 80 ± 5 ms
  1731.       1 |  12 ± 0,25 V  |     5 us     | 15,75 ± 0,25 V | 80 ± 5 ms
  1732.       2 |  12 ± 0,25 V  |     5 us     | 16,50 ± 0,25 V | 10 ± 1 ms
  1733.       3 |  12 ± 0,25 V  |    5 us     | 14,50 ± 0,25 V | 40 ± 5 ms
  1734.       4 |  12 ± 0,25 V  |     5 us     | 14,00 ± 0,25 V |100 ± 5 ms
  1735.  
  1736.  
  1737.  
  1738. To erase a GAL you have to apply HIGH to P/V then pulse STR low for
  1739. 100 ms and then apply LOW to P/V. After this the GAL is erased and ready
  1740. to be programmed again.
  1741.  
  1742.  
  1743. The internal organization of the GAL (addresses of the parts) looks as
  1744. follows:
  1745.  
  1746.  
  1747. GAL16V8, GAL16V8A,B:
  1748.  
  1749. Address                     Width
  1750.  
  1751.  0-31        Fuse-Matrix             64 Bit
  1752.    32        Signature            64 Bit
  1753. 33-59        reserved space            64 Bit
  1754.    60        Architecture-Control-Word ACW    82 Bit
  1755.    61        Security bit
  1756.    62        reserved
  1757.    63        Bulk Erase
  1758.  
  1759.  
  1760.  
  1761. GAL20V8, GAL20V8A,B:
  1762.  
  1763. Address                        Width
  1764.  
  1765.  0-39        Fuse-Matrix            64 Bit
  1766.    40        Signature                64 Bit
  1767. 41-59        reserved space            64 Bit
  1768.    60        Architecture-Control-Word ACW    82 Bit
  1769.    61        Security bit
  1770.    62        reserved
  1771.    63        Bulk Erase
  1772.  
  1773.  
  1774.  
  1775. The Architecture-Control-Word has the following structure (82 Bit wide):
  1776.  
  1777.  
  1778.  
  1779. GAL16V8:
  1780. Bits  0-31: 32 bit product term enable 0-31
  1781. Bits 32-35: 4 Bit XOR(n) for OLMC pins 19-16
  1782. Bit     36: AC0-Bit
  1783. Bits 37-44: 8 Bit AC1(n) for OLMC pins 19-12
  1784. Bit     45: SYN-Bit
  1785. Bits 46-49: 4 Bit XOR(n) for OLMC pins 15-12
  1786. Bits 50-81: 32 Bit product term enable 32-63
  1787.  
  1788. GAL16V8A,B:
  1789. Bits  0-3: 4 Bit XOR(n) for OLMC pins 19-16
  1790. Bit     4: AC0
  1791. Bit   5-8: 4 Bit AC1(n) for OLMC pins 19-16
  1792. Bit  9-72: 64 Bit product term enable PT0 - PT63
  1793. Bit 73-76: 4 Bit AC1(n) for OLMC pins 15-12
  1794. Bit    77: SYN
  1795. Bit 78-81: 4 Bit XOR(n) for OLMC pins 15-12
  1796.  
  1797.  
  1798. GAL20V8:
  1799. Bits  0-31: 32 Bit product term enable 0-31
  1800. Bits 32-35: 4 Bit XOR(n) for OLMC pins 22-19
  1801. Bit     36: AC0-Bit
  1802. Bits 37-44: 8 Bit AC1(n) für OLMC pins 22-15
  1803. Bit     45: SYN-Bit
  1804. Bits 46-49: 4 Bit XOR(n) für OLMC pins 18-15
  1805. Bits 50-81: 32 Bit product term enable 32-63
  1806.  
  1807. GAL20V8A,B:
  1808. Bits  0-3: 4 Bit XOR(n) for OLMC pins 22-19
  1809. Bit     4: AC0
  1810. Bit   5-8: 4 Bit AC1(n) for OLMC pins 22-19
  1811. Bit  9-72: 64 Bit product term enable PT0 - PT63
  1812. Bit 73-76: 4 Bit AC1(n) for OLMC pins 18-15
  1813. Bit    77: SYN
  1814. Bit 78-81: 4 Bit XOR(n) for OLMC pins 18-15
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820. III.2 Circuit Description
  1821. ------------------------------
  1822.  
  1823. In the following section I'll describe the functioning of my GAL-Programming
  1824. Device. I'll refer to my circuit diagram, so if you haven't ordered that,
  1825. you can skip this section.
  1826.  
  1827. The hardware is connected to the Amiga's parallel port. The connected data
  1828. signals are D0-D4 and the BUSY-Line.
  1829.  
  1830. IC1, IC3, IC4 and IC5 are eight way "serial in/parallel out" shift registers.
  1831. The outputs of the shift-register from IC3, IC4 and IC5 are connected to the
  1832. Textool-Zero insertion force socket for the GAL. Therefore it is possible to
  1833. (besides VCC and GND) define each of the GAL's pins with a level (HIGH or
  1834. LOW). The possible outputs of the GAL (pin 14 to 22) can be read through
  1835. IC7 and IC6a . IC7 is an eight way "parallel in/serial out" shift register.
  1836. IC1 is so to speak the switch centre, this IC selects IC3, 4 and 5 (OE).
  1837. Furthermore, this IC switches the programming voltages for the GAL (VCC,
  1838. Edit-voltage) on or off. Since the ICs 1, 3, 4, 5, 7 can be individually
  1839. accessed, a separate clock line is provided for each IC. These clock lines
  1840. are selected via IC2, a 1 out of 4-Decoder, by the parallel port's data lines
  1841. D0 and D1. D3 determines whether a read (low) or write (high) operation is
  1842. to occur. You must ensure that D3 does not go low until the IC to be
  1843. accessed is selected through D0 and D1. Otherwise an IC gets an unwanted
  1844. clock-pulse and at the next Strobe-pulse (D2) the wrong (once left shifted)
  1845. data is presented at the outputs. The Strobe-pulse for the shift-register is
  1846. derived from D2 . When D2 goes high, the data in the shift registers is
  1847. transferred to the output registers of  ICs 1, 3, 4, 5 . Through IC7, D2 can
  1848. be made high (D2 = high), so that the data on Pins P1-P8 are transferred to
  1849. the internal shift register and may be read through the BUSY line by clocking
  1850. the relevant clock-line. D4 transfers the individual bits from the Amiga to
  1851. the GAL-Burner. Since Pins 2 and 4 of the Textool-socket may be supplied with
  1852. the programming voltage of up to 16.5 Volt, we have to protect IC4 with the
  1853. diodes D2 and D3 against over voltage. The programming voltage is derived
  1854. from IC9, a switch mode voltage regulator. This voltage can be precisely
  1855. adjusted with the trimpots R40-R44.
  1856. The relay K1 connects the supply voltage of the GAL to
  1857. pin 24 of the Textool-Socket, Relay K2 connects the output Q7 from IC3 or +5V
  1858. supply voltage (according to the GAL type) to Pin 22 of the Textool-Socket.
  1859. Both relays are driven by IC1. The LED shows whether voltage is supplied to
  1860. the Textool-Socket or not. When the LED is on, a GAL may not be inserted or
  1861. removed from the socket.
  1862.  
  1863.  
  1864. Parallel-Port:
  1865.  
  1866.  D0-D1:  Selection of individual ICs by Clk
  1867.  D2:     Strobe-pulse for IC 1, 3, 4, 5
  1868.  D3:     write = low, read = high
  1869.  D4:     Data line for "Write Bits"
  1870.  BUSY:   Data line for "Read Bits"
  1871.  
  1872. IC1:
  1873.  Q1   make 16.5V (but don't switch it!)
  1874.  Q2   switch edit-current on pin 2 for GAL20V8
  1875.  Q3   switch edit-current on pin 4 for GAL16V8
  1876.  Q5   switch Vcc
  1877.  Q6   OE for IC3, 4, 5
  1878.  Q7   controlles LED on : high, low = off
  1879.  Q8   not used
  1880.  
  1881. IC3:
  1882.  Q1-Q8  pin 16-23 of the Textool-socket over R3-R8
  1883.  
  1884. IC4:
  1885.  Q1-Q8  pin 1-8 of the Textool-socket
  1886.  
  1887. IC5:
  1888.  Q1-Q3  pin 9-11 of the Textool-socket
  1889.  Q4     pin 13 of the Textool-socket
  1890.  Q5-Q6  pins 14, 15 of the Textool-socket over R9, R10
  1891.  
  1892. IC6:
  1893.  a      read pin 13 of the Textool-socket
  1894.  b      read buffer of IC7
  1895.  
  1896. IC7:
  1897.  P1-P8  read pin 14-21 of the Textool-socket
  1898.  
  1899.  
  1900.  
  1901.  
  1902. III.3 Construction
  1903. ----------------------
  1904.  
  1905. The parts list can be found in the appendix. If you want to save the cost
  1906. of the Textool-socket, you can also use a normal 24 pin socket, but since the
  1907. two pin rows are too far apart, you will have to carefully cut the socket
  1908. along it's length, and set them to the correct distance. Or you might like
  1909. to use "MOLEX" pins instead. For IC-sockets you should only use precision
  1910. sockets. The 25 Pin Sub-D-socket (A1000) or the Sub-D-plug (other Amiga
  1911. models) is connected as follows:
  1912.  
  1913.   D0   = pin 2
  1914.   D1   = pin 3
  1915.   D2   = pin 4
  1916.   D3   = pin 5
  1917.   D4   = pin 6
  1918.   BUSY = pin 11
  1919.   GND  : A1000  pin 14
  1920.      A500, A2000, A3000, ...  pin 17
  1921.  
  1922. The supply voltage (+5V and ground (GND) you will have to get from the
  1923. Amiga's Expansion-Port or from a regulated +5V power supply. The GAL-Burner
  1924. has a maximum current consumption of about 220 mA.
  1925.  
  1926. The main difficulty in the construction of the GAL-burner is probably the
  1927. PC board. Most likely a double sided through plated PCB is required, so
  1928. probably the best solution is to use a piece of veroboard, and connect the
  1929. relevant pins with fine hookup wire, or wire wrap wire. If you want the whole
  1930. thing to look impressive, you can use wiring guides. The wires can be
  1931. conducted via these guides, and wont go here there an everywhere.  I have
  1932. constructed my GAL-Burner and endless other projects in this way.
  1933. When you have built the circuit and you have connected it to the Amiga,
  1934. and the Amiga DIDN'T blow up, you can run the test program "GALerTest".
  1935. The program set various voltage levels on the Textool-socket, which you
  1936. can check with a VOM. The programming voltages are adjusted with R40-R44.
  1937. For this you can use "GALerTest".
  1938.  
  1939. DON'T FORGET: adjust the programming voltage with the trimpots, otherwise
  1940.               the GAL-burner will NOT FUNCTION !!!!
  1941.  
  1942. (start the "GALerTest" and click through to the relevant test points). If
  1943. the GAL-Burner works just as the test program demands, then you can try
  1944. burning a test GAL and test it with the GAL-Checker function of GALer. IF
  1945. this all works then there are no faults in the hardware. GALs of the type
  1946. GAL16V8 must be inserted in the Textool-socket, so that pin 1 of the GAL
  1947. lines up with pin 3 of the socket. With GALs of the type GAL20V8 pin 1 of
  1948. the GAL must line up with pin 1 of the socket.
  1949.  
  1950.  
  1951. Well that's about it. Chau and have fun with the cute GALs.
  1952.  
  1953.  
  1954.  
  1955. **************************************************************************
  1956.  
  1957.  
  1958.  
  1959. Appendix
  1960. ======
  1961.  
  1962. Keywords of the Source File:
  1963. ----------------------------
  1964.  
  1965. GAL16V8, GAL20V8          designates the GAL-Type
  1966. GAL16V8A, GAL20V8A
  1967.  
  1968. NC                  not connected (unused) pin
  1969. GND                 GROUND (=LOW)
  1970. VCC                 +5V    (=HIGH)
  1971. .T                  output pin is tristate output
  1972. .E                  tristate enable through product term
  1973. .R                  output pin is register output
  1974. =                   output pin is given an equivalence
  1975. +                   OR
  1976. *                   AND
  1977. /                   NOT
  1978. DESCRIPTION              indicates the end of the Boolean equations
  1979.  
  1980.  
  1981.  
  1982.  
  1983. Parts list:
  1984. ------------
  1985.  
  1986.     ICs:
  1987.     ----
  1988.      IC1, IC3, IC4, IC5   :   4 x   4094
  1989.      IC2              :   1 x   4555
  1990.      IC6              :   1 x   4503
  1991.      IC7              :   1 x   4021
  1992.      IC8              :   1 x   74LS06
  1993.      IC9              :   1 x   TL 497
  1994.      IC10              :   1 x   74LS145
  1995.  
  1996.     Diodes:
  1997.     -------
  1998.      D1-D4              :   4 x   1N4148
  1999.      LED              :   1 x   rot, 3 mm
  2000.  
  2001.     Transistors:
  2002.     ------------
  2003.      T2, T4, T5          :   3 x   BC237B
  2004.      T1, T3              :   2 x   BC327
  2005.  
  2006.  
  2007.     Resistors (5%, 1/4 Watt):
  2008.     -------------------------
  2009.      R1, R2, R35-39       :   7 x   1   KOhm
  2010.      R3-13, R19-26          :  19 x   10  KOhm
  2011.      R28-32              :   5 x   1,8 KOhm
  2012.      R14              :   1 x   1   Ohm
  2013.      R15              :   1 x   47  KOhm
  2014.      R34              :   1 x   220 Ohm
  2015.      R18              :   1 x   4,7 Ohm
  2016.      R27              :   1 x   47  Ohm
  2017.      R33              :   1 x   22  KOhm
  2018.      R40-44              :   5 x   1   KOhm trimpots
  2019.      (there are no R16, R17)
  2020.  
  2021.     Relays:
  2022.     -------
  2023.     K1, K2              :   2 x   relays with 5V or 6V, 1 x single
  2024.                     pole double throw
  2025.  
  2026.     Coil:
  2027.     -----
  2028.      L1              :   1 x   100 uH,    miniature fixed
  2029.  
  2030.  
  2031.     Kondensatoren:
  2032.     --------------
  2033.      C1              :   1 x   100 pF
  2034.      C2              :   1 x   4,7 uF, tantalum
  2035.      C3              :   1 x   100 nF
  2036.      C4              :   1 x   220 uF, 25V
  2037.  
  2038.  
  2039.     Sundries:
  2040.     ----------
  2041.  
  2042.      IC-Sockets
  2043.        8 x 16 pin
  2044.        2 x 14 pin
  2045.        1 x Textool-Socket 24 pin, narrow! (.3 row spacing) or use
  2046.            a universal type
  2047.        1 x 25 pin female Sub-D connector for Amiga 1000
  2048.          or 25 pin male Sub-D connector for all other Amiga types
  2049.  
  2050. u = mikro
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059. Bibliography:
  2060. ------------------
  2061.  
  2062.  
  2063. 1) GALs - Programmierbare Logikbausteine in Theorie and  Praxis
  2064.    Bitterle
  2065.    Franzis-Verlag
  2066.    This book (German) is well suited for beginners.
  2067.  
  2068.  
  2069. 2) Programmable Logic Manual - GAL Products
  2070.    SGS-Thomson
  2071.    This book (english) is for the pro.
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.